{% load i18n static %}
{% if request.is_ajax %}
    {% if exception %}
        {{ exception }}
    {% else %}
        <h4>{% trans 'Page does not exist' %}</h4>
        <p>{% blocktrans with pth=request_path %}The page '{{ pth }}' was not found{% endblocktrans %}</p>
    {% endif %}
{% else %}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head lang="{{ LANGUAGE_CODE }}">
    <meta charset="UTF-8">
    <title>{% trans 'Page does not exist' %}</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="shortcut icon" href="{% static 'img/favicon_m.ico' %}">
    <!-- Core CSS - Include with every page -->
    <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">

    <style>
        .no-border-on-me>thead>tr>th,
        .no-border-on-me>tbody>tr>th,
        .no-border-on-me>tfoot>tr>th,
        .no-border-on-me>thead>tr>td,
        .no-border-on-me>tbody>tr>td,
        .no-border-on-me>tfoot>tr>td
        {
            border-top-style: none;
            border-bottom-style: none;
        }

    </style>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>

<div class="container">
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <div align="center"><h1>404 - {% trans 'Page does not exist' %}</h1></div>
            <div align="center">
                {% if exception %}
                    {{ exception }}
                {% else %}
                    <p>{% blocktrans with pth=request_path %}The page '{{ pth }}' was not found{% endblocktrans %}</p>
                {% endif %}
                <a href="/accounts/">{% trans 'To main' %}</a>
            </div>
        </div>
    </div>
</div>

</body>
</html>
{% endif %}
